package com.laotou99.gjCoin.web;

import static spark.Spark.*;

import spark.Request;
import spark.Response;
import spark.Route;

public class MainWeb {

	public static void main(String[] args) {
		System.out.println("web start");
		
	}

	public static void test1(){
		
		get("/hello", new Route() {			
			@Override
			public Object handle(Request arg0, Response arg1) throws Exception {
				System.out.println("hello");
				return "hello";
			}
		});
		
		get("/abc",(request,response)->{
			System.out.println("abc");
			return "abc";
		});
		
		get("/aaa",(request,response)-> "aaaa");
		
		get("/user/:name",(request,response)->
			"name:"+request.params(":name")
		);
	}
}
